import 'package:flutter_test/flutter_test.dart';
import 'package:huaweimap/huaweimap.dart';
import 'package:huaweimap/huaweimap_platform_interface.dart';
import 'package:huaweimap/huaweimap_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockHuaweimapPlatform
    with MockPlatformInterfaceMixin
    implements HuaweimapPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final HuaweimapPlatform initialPlatform = HuaweimapPlatform.instance;

  test('$MethodChannelHuaweimap is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelHuaweimap>());
  });

  test('getPlatformVersion', () async {
    Huaweimap huaweimapPlugin = Huaweimap();
    MockHuaweimapPlatform fakePlatform = MockHuaweimapPlatform();
    HuaweimapPlatform.instance = fakePlatform;

    expect(await huaweimapPlugin.getPlatformVersion(), '42');
  });
}
